package com.thon.dao.project;

import java.util.Date;
import java.util.List;

import com.thon.dao.util.BaseDao;
import com.thon.dao.util.Page;
import com.thon.entity.project.Product;
import com.thon.entity.project.ProjectSupport;

/**
 * @file ProjectSupportDao.java
 * @author Zemo
 * @mail zemochen@gmail.com
 * @data 2013年10月11日 上午11:31:52
 * @description: TODO
 */
public interface ProjectSupportDao extends BaseDao<ProjectSupport> {

	public Long countSupports(int projectId);

	public Long sumFundCurrent(Integer projectId);

	public Long sumSaleCurrent(Integer projectId);
	
	public List<ProjectSupport> listProjectSupportsByProject(int projectId);

	public List<ProjectSupport> listProjectSupportsByUser(int userId);

	public Page<ProjectSupport> findSupportsById(Page<ProjectSupport> page,
			int projectId);

	public Page<ProjectSupport> findSupportsByUser(Page<ProjectSupport> page,
			int userId, String start, String end);
	
	public Long countSupports(int projectId,int userId);
	
	public Long countProductAmount(int projectId,int userId,int productId);
	
	public Long countProductAmount(int projectId);
	
	public List<ProjectSupport> getProjectSupport(int userId);

	public Long sumFundByUser(Integer id, int userId);

	public Page<ProjectSupport> findProjectSupport(Page page);	
	
	 public List<ProjectSupport> listProjectSupportsByProjectId(Date registDateStart,Date comsumptionDateStart,Date registDateEnd,Date comsumptionDateEnd);
}
